<template>
  <h2>Child组件</h2>
</template>

<script lang="ts">
import {defineComponent,ref,reactive, onBeforeMount,onMounted,onBeforeUpdate,onUpdated,onBeforeUnmount,onUnmounted, inject} from "vue"
export default defineComponent ({
    name:"child",
    setup(){
        const color = inject("color");
        console.log(color);//? RefImpl {_rawValue: "red", _shallow: false, __v_isRef: true, _value: "red"}   
    }
})
</script>

<style scoped>

</style>
